package com.example.dubbo.demo.server.modules.message.controller;

import com.example.dubbo.demo.server.modules.message.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* <p>
*  前端控制器
* </p>
*
* @author dzii
* @since 2022-03-19
*/
@RestController
@RequestMapping("/message")
public class MessageController {

    @Autowired
    private MessageService messageService;

    @PostMapping("/save")
    public boolean saveMessage(@RequestBody String message) {
        return messageService.save(message);
    }

}
